package cn.kilo.domain.service.order;

import cn.kilo.domain.model.order.vo.OrderStatusVO;
import cn.kilo.domain.repository.IStrategyRepository;
import cn.kilo.domain.service.order.stock.IOrderStock;
import cn.kilo.domain.support.SnowFlake;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.time.LocalDateTime;

/**
 * @author kilok
 */
@Service
@Slf4j
public abstract class AbstractStaffStrategyChain implements IStaffStrategyChain {

    @Resource
    protected SnowFlake snowFlake;


    @Resource
    protected IStrategyRepository repository;

    @Resource
    protected IOrderStock orderStock;

    public OrderStatusVO build(Long orderId, String staffName, String status, String start, String end, Integer distance, String ridgepole, LocalDateTime now, String orderInfo, String type, String orderCode, String orderNumber, Integer price,String userId) {
        return OrderStatusVO.builder().orderId(orderId).staffName(staffName).status(status).start(start).end(end).distance(distance).ridgepole(ridgepole).now(now).orderInfo(orderInfo).type(type)
                .orderCode(orderCode)
                .orderNumber(orderNumber)
                .price(price)
                .userId(userId)
                .build();
    }
}
